<?php
include 'config.php';
include 'common.php';

require "vendor/autoload.php";
use Gaoming13\WechatPhpSdk\Wechat;
use Gaoming13\WechatPhpSdk\Api;




// AppID(应用ID)
$appId = $config['AppId'];
// AppSecret(应用密钥)
$appSecret = $config['AppSecret'];
// Token(令牌)
$token = 'e10adc3949ba59a';
// EncodingAESKey(消息加解密密钥)
$encodingAESKey = 'Zk55c271FPhOWi7igIWg0pezuUpDxnHZ41e6RFtfPn5';


// api模块 - 包含各种系统主动发起的功能
$api = new Api(
    array(
        'appId' => $appId,
        'appSecret'	=> $appSecret,
    )
);




$res = $api->create_menu('{
    "button": [
        {
            "type": "view",
            "name": "抓娃娃",
            "url": "https://m.mxzhuawawa.com"
        },
        {
            "type": "view",
            "name": "充值",
            "url": "https://m.mxzhuawawa.com/recharge.html"
        },
        {
            "name": "更多",
            "sub_button": [
                {
                    "type": "view",
                    "name": "安卓下载",
                    "url": "http://sj.qq.com/myapp/detail.htm?apkName=com.mxzhuawawa.app"
                },
                {
                    "type": "view",
                    "name": "IOS下载",
                    "url": "https://itunes.apple.com/cn/app/%E6%A2%A6%E6%83%B3%E6%8A%93%E5%A8%83%E5%A8%83/id1316363571?mt=8"
                },
            ]
        }
    ]
}');
